package com.PlantVsZombies.constant;

import java.awt.Image;

import com.PlantVsZombies.util.ImageUtil;

public enum PlantType {
	NONE(null), 
	SunFlower(ImageUtil.SUNFLOWER0.getImage()), // 调用了PlantType的构造方法，此时moveImg是sun_flower1.png
	SingleBullet(ImageUtil.PEAPLANT.getImage()), // 调用了PlantType的构造方法，此时moveImg是single_bullet_plant.png
	Cherry(ImageUtil.CHERRY.getImage()),
	SmallStone(ImageUtil.STONE.getImage()),
	QH1(ImageUtil.qh1),
	QH2(ImageUtil.qh2),
	QH3(ImageUtil.qh3),
	SHOVEL(ImageUtil.shovel),
	DoubBullet(null);

	private Image plantImg;

	PlantType(Image plantImg) {
		this.plantImg = plantImg;
	}

	public Image getPlantImg() {
		return plantImg;
	}

	/*public int getCost(PlantType p) {
		switch (p) {
		case NONE:
			return 0;
		case SunFlower:
			return 50;
		case SingleBullet:
			return 100;
		case Cherry:
			return 150; 
		case SmallStone:
			return 50;
		case QH1:
			return 200;
		case QH2:
			return 250;
		case QH3:
			return 300;
		default:
			return 0;
		}*/
		
		public int getCost(PlantType p) {
			switch (p) {
			case NONE:
				return 0;
			case SunFlower:
				return 0;
			case SingleBullet:
				return 0;
			case Cherry:
				return 0; 
			case SmallStone:
				return 0;
			case QH1:
				return 0;
			case QH2:
				return 0;
			case QH3:
				return 0;
			default:
				return 0;
			}
	}

}
